package com.jeesite.modules.examine.entity;

import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.car.entity.Car;

import java.util.Date;

/**
 * 审核记录Entity
 * @author Qu
 * @version 2023-12-20
 */
@Table(name="h_examine", alias="a", label="审核记录信息", columns={
		@Column(name="examine_id", attrName="examineId", label="审核id", isPK=true),
		@Column(name="car_id", attrName="carId", label="车辆id"),
		@Column(name="examine_result", attrName="examineResult", label="审核结果（0通过 1驳回）"),
		@Column(name="examine_content", attrName="examineContent", label="审核内容"),
		@Column(name="create_by", attrName="createBy", label="审核者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="审核时间", isUpdate=false, isQuery=false, isUpdateForce=true),
	},joinTable={
        @JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Car.class, alias="b",
                on="a.car_id = b.car_id", attrName="this",
                columns={
                        @Column(name="car_title", attrName="carTitle", label="名称", queryType=QueryType.LIKE),
						@Column(name="user_code", attrName="userCode", label="商户编码"),
                }),
}, orderBy="a.examine_id DESC"
)
public class Examine extends DataEntity<Examine> {
	
	private static final long serialVersionUID = 1L;
	private String examineId;		// 审核id
	private String carId;		// 车辆id
	private String examineResult;		// 审核结果（0通过 1驳回）
	private String examineContent;		// 审核内容
	private String createBy;		// 审核者
	private String carTitle;		// 车辆名称
	private Date createDate;		// 审核时间

	private String userCode;     // 商户编码

	public Examine() {
		this(null);
	}
	
	public Examine(String id){
		super(id);
	}
	
	public String getExamineId() {
		return examineId;
	}

	public void setExamineId(String examineId) {
		this.examineId = examineId;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	@Size(min=0, max=64, message="车辆id长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Size(min=0, max=64, message="审核结果长度不能超过 64 个字符")
	public String getExamineResult() {
		return examineResult;
	}

	public void setExamineResult(String examineResult) {
		this.examineResult = examineResult;
	}
	
	@Size(min=0, max=128, message="审核内容长度不能超过 128 个字符")
	public String getExamineContent() {
		return examineContent;
	}

	public void setExamineContent(String examineContent) {
		this.examineContent = examineContent;
	}

    @Override
    public String getCreateBy() {
        return createBy;
    }

    @Override
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Override
    public Date getCreateDate() {
        return createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getCarTitle() {
        return carTitle;
    }

    public void setCarTitle(String carTitle) {
        this.carTitle = carTitle;
    }
}